#ifndef CCHARACTER_H
#define CCHARACTER_H
#include "opencv2/opencv.hpp"
#include <iostream>

using namespace cv;
using namespace std;

enum Color{ BLUE, YELLOW, WHITE, UNKNOWN };

class CCharacter {
public:
	CCharacter()
	{
		m_characterMat = Mat();
		m_characterPos = Rect();
		m_characterStr = "";
		m_score = 0;
		m_center = Point(0,0);
	}

	CCharacter(const CCharacter& other)
	{
		m_characterMat = other.m_characterMat;
		m_characterPos = other.m_characterPos;
		m_characterStr = other.m_characterStr;
		m_score = other.m_score;
		m_center = other.m_center;
	}

	inline void setCharacterMat(Mat param) { m_characterMat = param; }
	inline Mat getCharacterMat() { return m_characterMat; }

	inline void setCharacterPos(Rect param) { m_characterPos = param; }
	inline Rect getCharacterPos() const { return m_characterPos; }

	inline void setCharacterStr(String param) { m_characterStr = param; }
	inline String getCharacterStr() const { return m_characterStr; }

	inline void setCharacterScore(double param) { m_score = param; }
	inline double getCharacterScore() const { return m_score; }

	inline bool getIsSoStrong() const { return m_score >= 0.9; }
	inline bool getIsStrong() const { return m_score >= 0.8; }
	inline bool getIsWeak() const { return ( m_score < 0.8 && m_score >= 0.5 ) ; }

	inline void setCenterPoint(Point param) { m_center = param; }
	inline Point getCenterPoint() const { return m_center; }

	inline void setOstuLevel(double param) { m_ostuLevel = param; }
    inline double getOstuLevel() const { return m_ostuLevel; }

	bool operator < (const CCharacter& other) const
	{
		return (m_score > other.m_score);
	}

	bool operator < (const CCharacter& other)
	{
		return (m_score > other.m_score);
	}

private:
	//! character mat
	Mat m_characterMat;
	// Mat m_characterMat;

	//! character rect
	Rect m_characterPos;

	//! character str
	String m_characterStr;

	//! character likely
	double m_score;
	//! center point
	Point m_center;

	//! ostu level
    double m_ostuLevel;
};

#endif
